
//初始加载
export default function RootLoad(inBrowser,rootPath ) {

    return new Promise(function (resolve, reject) {
        let root;
        if( inBrowser){
            import('./WebRoot.js').then((WebRoot) => {
                root=new WebRoot.default(rootPath);

                resolve(root)

            })
        }else {
            import('./NodeRoot.js').then((NodeRoot) => {
                root=new NodeRoot.default(rootPath);

                resolve(root)
            })


        }
    });


}
